﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DtoFw.Result
{
    public class MainUserResult
    {

    }
    public class UserLoginInfo
    {
        public long Id { get; set; } = 0;

        public string UserName { get; set; }

        public string UserNo { get; set; }
        public long OrganId { get; set; }
        public string OrganName { get; set; }

        public long RoleId { get; set; } = 0;
        public string Token { get; set; } = "";
        public string RefreshToken { get; set; } = "";

        public string Phone { get; set; }
    }

    public class MainUserLoginInfo: UserLoginInfo
    {
        public string OpenId { get; set; } = "";
        public Notification notification { get; set; }

    }

    public class Notification 
    {
        public int NotificationNum { get; set; }
        public string NotificationContent { get; set; }
    }
    /// <summary>
    /// 登录返回
    /// </summary>
    public class MainUserLoginResult : MainUserLoginInfo
    {
        public string Name { get; set; }
        public string RoleName { get; set; }
        public string CenterId { get; set; }

        public string OrganName { get; set; }
        public List<RoleMenuResult> roleMenus { get; set; }
    }
    /// <summary>
    /// 用户角色菜单
    /// </summary>
    public class RoleMenuResult
    {
        public long Id { get; set; }
        public int Level { get; set; } = 0;
        public long ParentId { get; set; }
        public string Name { get; set; }
        public string Path { get; set; }
        public string Component { get; set; }
        public string Title { get; set; }
        public int Sort { get; set; }
        public string Icon { get; set; }

        public string IsLink { get; set; }
        public bool IsHide { get; set; }
        public bool IsKeepAlive { get; set; }

        public bool IsAffix { get; set; }

        public string LinkPath { get; set; }
        public string Auth { get; set; }

        public List<RoleMenuResult> Children { get; set; }
        public Meta Meta { get; set; }
    }


    public class Meta 
    {
        public string Title { get; set; }
        public string IsLink { get; set; }
        public bool IsHide { get; set; } = false;
        public bool IsKeepAlive { get; set; } = true;
        public bool IsAffix { get; set; } = false;
        public string LinkPath { get; set; }
        public string Component { get; set; }

        public List<string> Auth { get; set; } = new List<string> { "admin" };
        public string Icon { get; set; }
    }
    
    /// <summary>
    /// 菜单列表信息
    /// </summary>
    public class MenuInfoResult
    {
        public long Id { get; set; }

        public string ParentName { get; set; }
        public string MenuName { get; set; }

        public string MenuUrl { get; set; }
        public int Level { get; set; }

        public string SchoolTypeName { get; set; }
        public long ParentId { get; set; }

        public int Sort { get; set; }

        public string Icon { get; set; }

        public string Title { get; set; }

        public DateTime CreateDate { get; set; }
    }
    public class TotalResult
    {
        public int TotalCount { get; set; }
    }
    public class UserInfoEditInfo: UserInfoInfo
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public long Id { get; set; } = 0;
    }
    public class UserInfoAddInfo : UserInfoInfo
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public long Id { get; set; } = 0;

        /// <summary>
        /// 密码
        /// </summary>
        public string Pwd { get; set; }
    }
    public class UserInfoInfo : BaseOperator
    {
        /// <summary>
        /// 单位Id
        /// </summary>
        public long OrgId { get; set; } = 0;

        /// <summary>
        /// 角色Id
        /// </summary>
        public long RoleId { get; set; } = 0;
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 警号
        /// </summary>
        public string PoliceNo { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        public string CardNo { get; set; }

        /// <summary>
        /// 职务
        /// </summary>
        public string PostName { get; set; }
        /// <summary>
        /// 人员状态
        /// </summary>
        public int EmpStatus { get; set; } = 1;
        /// <summary>
        /// 用户状态
        /// </summary>
        public int UserStatus { get; set; } = 1;


        /// <summary>
        /// 账号
        /// </summary>
        public string UserNo { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 性别：1男，2女
        /// </summary>
        public int Sex { get; set; } = 1;
        /// <summary>
        /// IP地址
        /// </summary>
        public string Ip { get; set; }
    }
    /// <summary>
    /// 返回用户列表
    /// </summary>
    public class UserinfoResult
    {
        /// <summary>
        /// 主键id
        /// </summary>
        public long Id { get; set; }
        public long OrgId { get; set; }

        public long RoleId { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        public string RoleName { get; set; }
        /// <summary>
        /// 机构名称
        /// </summary>
        public string OrganName { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        public string UserNo { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public int Sex { get; set; }

       public string PostName { get; set; }

        public string PoliceNo { get; set; }

        public int EmpStatus { get; set; }
        public int UserStatus { get; set; }
        public DateTime CreateTime { get; set; }
        public string Creator { get; set; }

        public string CardNo { get; set; }

    }
}
